www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\D_u_photo_list.asp
<% '************************************************************** ' 新动软网站管理系统 ' 官方网站: http://www.aspcpu.com ' 系统作者: 阮丁远(网名:天下程序) ' Copyright 新动软网站管理系统 版权所有 '************************************************************** %> <% '----------------------------------------相册系统: dir_set="../" %> <%Server.ScriptTimeOut=5000%> <!--#include file="../inc/conn.asp"--> <!--#include file=inc/sys.asp--> <!--#include file=inc/get.asp--> <!--#include file=../inc/ND_class_function.asp--> <!--#include file=../inc/functionFiless.asp--> <!--#include FILE="upload_5xsoft.asp"--> <!--#include file=../inc/jpeg_draw.asp--> <%dim nndid,ifmain Sub msg(ssddd) %> <script language="javascript"> alert("<%=ssddd%>"); history.go(-1); </script> <% response.end end sub userName=Request.Cookies("nd_cache_varb_blog")("UserName") Password=Request.Cookies("nd_cache_varb_blog")("Password") userlevel=Request.Cookies("nd_cache_varb_blog")("userlevel") if userName="" then response.Redirect "../blog/userlogin.asp" else set rsuu=Server.CreateObject("ADODB.recordset") rsuu.open"select * from ND_user where [username]='"&userName&"'",conn,1,1 userid=rsuu("id") If request("submitok")="del" Then'删除 nndid=request("photoid") if nndid="" or not isnumeric(nndid) then call msg("非法操作!请求错误。","-1") else nndid=clng(nndid) end if ifmain=request("ifmain") if ifmain="" or not isnumeric(ifmain) then call msg("非法操作!请求错误。","-1") else ifmain=clng(ifmain) end if picurl_s888=trim(request("picurl_s")) conn.execute("Delete from ND_userphotos where id="&nndid) if picurl_s888<>"" then call deletefile(picurl_s888) response.redirect "D_u_photo_list.asp?page="&request("page") Elseif request("submitok")="main" Then'设为头像 nndid=request("photoid") if nndid="" or not isnumeric(nndid) then closeconn call msg("非法操作!请求错误。","-1") else nndid=clng(nndid) end if '限制没有审核的相片设置成头像 'photoid=request("photoid") 'set rs=Server.CreateObject("ADODB.recordset") 'rs.open"select usernid,flag from love_photo where id="&photoid&"",conn,1,1 'If rs.BOF=true and rs.EOF =true Then' 'rs.close:set rs=nothing 'closeconn 'call msg("非法操作!","-1") 'Else 'dim tempebbs 'tempeb=rs(1) 'rs.close:set rs=nothing 'End if '更新库 'if clng(tempebbs)<clng(pic_flag) then ' call msg("设置头像失败\n\n您的相片没有通过审核\n\n请耐心等待!","D_u_photo_list.asp") 'end if picurl_s888=trim(request("picurl_s")) conn.execute("Update ND_userphotos set ifmain=0 where ifmain=1 and userid='"&userid&"'") conn.execute("Update ND_userphotos set ifmain=1 where id="&nndid) response.redirect "D_u_photo_list.asp?page="&request("page") End if %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>照片管理</title> <LINK href="css.css" type=text/css rel=stylesheet> </head> <table width="778" height="7" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FF156D"> <tr> <td></td> </tr> </table> <table width="778" height="491" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="FFD7ED"> <tr> <td width="160" align="center" valign="top" bgcolor="#FFFFFF"> <br> </td> <td width="618" align="center" valign="top" bgcolor="#FFFFFF"><table width="100%" height="6" border="0" cellpadding="0" cellspacing="0" bgcolor="ECF9FF"> <tr> <td></td> </tr> </table> <table width="100%" height="52" border="0" cellpadding="0" cellspacing="0" background="images/titlebg2.gif"> <tr> <td width="42%"><img src="images/usertitle10.gif" width="231" height="52" ></td> <td width="58%" valign="top"><table width="75" height="9" border="0" cellpadding="0" cellspacing="0"> <tr> <td></td> </tr> </table> <a href="D_u_photo_list.asp"><img src="images/photpmanage.gif" width="99" height="21" hspace="5" border="0"></a> <a href="D_u_photo_up.asp"><img src="images/photpmanage2.gif" width="99" height="21" hspace="5" border="0"></a></td> </tr> </table> <br> <table width="569" border="0" cellpadding="0" cellspacing="0" > <tr> <td align="center"><font color="#FF3300">你知道吗?有照片的 浏览量至少会提高10倍以上。</font></td> </tr> </table> <%set rs=server.createobject("adodb.recordset") rs.open "select * from ND_userphotos where userid='"&userid&"' order by ifmain desc,id desc",conn,1,1 IF rs.BOF=true and rs.EOF =true THEN %> <table width="281" height="115" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td align="center" bgcolor="#F7F7F7"><br> 您还没有上传照片<br> <br> <a href=D_u_photo_up.asp><img src=images/lkup.gif width=69 height=21 hspace=5 border=0></a> <br> <br> <br> <br> <br> </td> </tr> </table> <%ELSE %> <br> <% rs.pagesize=12 if request("Page")="" then pagexx=1 else pagexx=clng(request("Page")) end if rs.absolutepage=pagexx %> <table width="560" height="171" border="0" align="center" cellpadding="8" cellspacing="0"> <tr align="center"> <%for a=0 to (rs.pagesize-1)%> <%If a mod 4 = 0 Then%> </tr> <tr align="center" valign="bottom" bgcolor="#FFFFFF"> <td align="center"> <table width="130" border="0" cellpadding="0" cellspacing="1" bgcolor=#cccccc style="border-right:#efefef 2px solid;border-bottom:#efefef 2px solid;"> <tr> <td height="100" align="center" bgcolor=<%if rs("ifmain")=1 then response.write "#ffffcc" else response.write"#ffffff" end if%>><a href="<%=rs("picurl_s")%>" target="_blank"><img src="<%=rs("picurl_s")%>" border="1" width=150 style="border-color:#666666;"></a></td> </tr> <tr> <td height="20" align="center" bgcolor=<%if rs("ifmain")=1 then response.write "#ffffcc" else response.write"#E2F0F4" end if%>><%if rs("ifmain")=1 then response.write "<font color=#ff6600>" end if%><%=rs("title")%></td> </tr> <tr> <td height="20" align="center" bgcolor="#FFFFFF"><%=rs("addtime")%></td> </tr> <tr> <td height="20" align="center" style="padding-top:4px;" bgcolor=<%if rs("ifmain")=1 then response.write "#aaaaaa" else response.write"#999999" end if%><%if rs("ifmain")=0 and rs("is_shenhe")=1 then%>><a href="D_u_photo_list.asp?submitok=main&picurl_s=<%=rs("picurl_s")%>&picurl_b=<%=rs("picurl_s")%>&photoid=<%=rs("id")%>&page=<%=pagexx%>" ><u><font color="#FF0000">点击设为头像</font></u></a><%elseif rs("ifmain")=1 then%><font color="#FFffff">★主照片</font><%elseif rs("is_shenhe")=0 then response.write"<font color=red>还未审核</font>" end if%> <a href="D_u_photo_list.asp?submitok=del&picurl_s=<%=rs("picurl_s")%>&picurl_b=<%=rs("picurl_s")%>&photoid=<%=rs("id")%>&page=<%=pagexx%>&ifmain=<%=rs("ifmain")%>" onClick="return confirm('请慎重!\n\n确认彻底删除该照片?')"><u><font color="#FFffff">删除</font></u></a></td> </tr> </table> </td> <%Else%> <td align="center" bgcolor="#FFFFFF"> <table width="130" border="0" cellpadding="0" cellspacing="1" bgcolor=#cccccc style="border-right:#efefef 2px solid;border-bottom:#efefef 2px solid;"> <tr> <td height="100" align="center" bgcolor=<%if rs("ifmain")=1 then response.write "#ffffcc" else response.write"#ffffff" end if%>><a href="<%=rs("picurl_s")%>" target="_blank"><img src="<%=rs("picurl_s")%>" border="1" width=150 style="border-color:#666666;"></a></td> </tr> <tr> <td height="20" align="center" bgcolor=<%if rs("ifmain")=1 then response.write "#ffffcc" else response.write"#E2F0F4" end if%>><%if rs("ifmain")=1 then response.write "<font color=#ff6600>" end if%><%=rs("title")%></td> </tr> <tr> <td height="20" align="center" bgcolor="#FFFFFF"><%=rs("addtime")%></td> </tr> <tr> <td height="20" align="center" style="padding-top:4px;" bgcolor=<%if rs("ifmain")=1 then response.write "#aaaaaa" else response.write"#99999" end if%>> <%if rs("ifmain")=0 and rs("is_shenhe")=1 then%> <a href="D_u_photo_list.asp?submitok=main&picurl_s=<%=rs("picurl_s")%>&picurl_b=<%=rs("picurl_s")%>&photoid=<%=rs("id")%>&page=<%=pagexx%>" ><u>点击设为头像</u></a><%elseif rs("ifmain")=1 then%><font color="#ffffff">★主照片</font><%elseif rs("is_shenhe")=0 then response.write"<font color=red>还未审核</font>" end if%> <a href="D_u_photo_list.asp?submitok=del&picurl_s=<%=rs("picurl_s")%>&picurl_b=<%=rs("picurl_s")%>&photoid=<%=rs("id")%>&page=<%=pagexx%>&ifmain=<%=rs("ifmain")%>" onClick="return confirm('请慎重!\n\n★确认彻底删除该照片?')"><u><font color="#FFffff">删除</font></u></a> </td> </tr> </table></td> <% End If rs.movenext if rs.eof then exit for next %> </tr> </table> <br> <table width="470" height="9" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" > <tr> <td valign="top"></td> </tr> </table> <table width="540" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" > <tr> <td align="right" valign="top" style="color:#A5537B;"> <% if pagexx=empty then pagexx=1 if pagexx < 1 then pagexx=1 if pagexx > rs.pagecount then pagexx=rs.pagecount %> 第 <font color=ff0000><b><%=pagexx%></b></font> 页/共 <font color=ff0000><b><%=rs.pagecount%></b></font> 页  共 <font color=ff0000><b><%=rs.recordcount%></b></font> 张相片  <%if pagexx<>1 then%> <a href=<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=1&username=<%=replace(request("username"),"'","''")%>><font color="A5537B">首页</font></a> <a href=<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=(pagexx-1)%>&username=<%=replace(request("username"),"'","''")%>><font color="A5537B">上页</font></a> <%else%> <font color=A5537B>首页 上页</font> <%end if%> <% if pagexx<>rs.pagecount then%> <a href=<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=(pagexx+1)%>&username=<%=replace(request("username"),"'","''")%>><font color="A5537B">下页</font></a> <a href=<%=Request.ServerVariables("SCRIPT_NAME")%>?Page=<%=rs.pagecount%>&username=<%=replace(request("username"),"'","''")%>><font color="A5537B">尾页</font></a> <%else%> <font color=A5537B>下页 尾页</font> <%end if%> </td> </tr> </table> <% END IF rs.close set rs=nothing %> <br> <table width="530" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="30" valign="top" style="color:#666666;"> </td> </tr> </table></td> </tr> </table> <table width="778" height="5" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" > <tr> <td></td> </tr> </table> </body> </html> <%end if %>